<!DOCTYPE html>
<html lang="en">
{% extends 'static.html' %}
{% load static %}
<head>
    <meta charset="UTF-8">
    {% block title %}
        <title>修改个人信息</title>
    {% endblock %}
</head>
<body>
{% block static %}
    <div class="wrapper wrapper-content ">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <form role="form" class="layui-form" id="editform">
                            {% csrf_token %}
                            <input type="hidden" value="{{ user.id }}" id="id" name="id">
{#                            <input type="hidden" value="{{ data.pid }}" id="pid" name="pid">#}
                            <div class="layui-form-item col-sm-12">
                                <label class="col-sm-3 control-label" for="username">姓名:</label>
                                <div class="col-sm-12">
                                    <input id="username" name="username" class="form-control" type="text" lay-verify="required"
                                          value="{{ user.username }}">
                                </div>
                            </div>
                            <div class="layui-form-item col-sm-12">
                                <label class="col-sm-3 control-label" for="email">邮箱:</label>
                                <div class="col-sm-12">
                                    <input id="email" name="email" class="form-control" type="text" lay-verify="email"
                                           value="{{ user.email }}">
                                </div>
                            </div>
                           <div class="layui-form-item col-sm-12">
                                <label class="col-sm-3 control-label" for="sex">性别:</label>
                                <div class="col-sm-12">
                                    {% for i in user_list %}
                                        {% if i == user.sex %}
                                            <input type="radio" id="sex" name="sex" value="{{ i }}" title="{{ i }}"
                                                   checked>
                                        {% else %}
                                            <input type="radio" id="sex" name="sex" value="{{ i }}" title="{{ i }}">
                                        {% endif %}
                                    {% endfor %}
                                </div>
                            </div>
                            <div class="layui-form-item col-sm-12">
                                <div class="col-sm-12">
                                    <button class="layui-btn btn-block" lay-submit lay-filter="formDemo">提交
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
            <script src="{% static 'js/upuserInfo.js' %}"></script>
{% endblock %}
</body>
</html>